package chapter3;

public class LoopBenchmark extends Benchmark {
    
    private int loopCount;
    
    LoopBenchmark(int count){
        loopCount = count;
    }

    @Override
    void benchmark() {
        for(int i = 0; i < loopCount; i++){
            
        }
    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        int count = 1000;
        long time = new MethodBenchmark().repeat(count);
        //mac 1 3000~4000
        //10 4000
        //100 7000
        //1000 30000
        //10000 303000
        
        //company 1 2720
        //10 3100
        //100 4559
        //1000 21549
        System.out.println(count + " loops in " + time + " nanoseconds");
    }

}
